The use of cache is common in computer processor designs. In particular, cache is used in various designs of central processing units (CPUs), graphical processing units (GPUs), and video processors. In conventional cache designs, the size of the cache is fixed. In other words, the size of each cache line and the number of cache lines within the cache is the same for different commands and operations.
In computer graphics systems, caches are typically used to store vertices of triangles or other polygons which are used to model objects. An object can be modeled with a single triangle or thousands or millions of triangles. In conventional computer graphics systems, these vertices are stored in a vertex cache with a fixed cache line size and a fixed number of cache lines. Since different graphics commands can use different sizes of vertices, the cache line size of conventional computer graphics systems is typically set at a fixed size to accommodate the maximum possible vertex size. However, this allocation of cache memory is not efficient in many instances because many commands use a vertex size that is smaller than the maximum possible vertex size. In other words, each cache line may have extra memory capacity that is not used because the vertex size is smaller than the fixed cache line size.